package cn.tt.tuantuanerp.passport.webapi.controller;



import cn.tt.tuantuanerp.passport.service.IRoleServer;
import cn.tt.tuantuanerp.tuantuanerp.comment.pojo.vo.RoleListItemVO;
import cn.tt.tuantuanerp.tuantuanerp.comment.web.JsonResult;
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * 管理员控制层
 *
 * @author gudiwen
 * @version 0.0.1
 */
@Slf4j
@Api(tags = "2.角色模块")
@RestController
@RequestMapping("/role")
@Validated
public class RoleController {

    @Autowired
    IRoleServer roleServer;

    @ApiOperation("查询角色列表")
    @ApiOperationSupport(order = 300)
    @GetMapping("")
    public JsonResult<List<RoleListItemVO>> list(){
        return JsonResult.ok(roleServer.list());
    }


}
